import { connect } from 'react-redux'
import MiaoTabbar from './components/Tabbar'
import MyRouter from './indexRouter/index'
import './util/axiosinterceptor'

function App(props) {
  let {show} = props
  return (
    <div>
        <MyRouter>
          {show && <MiaoTabbar></MiaoTabbar>}
        </MyRouter>
    </div>
  )
}

const changeStateToProps = (state) =>{
  return {
    show: state.TabbarReducer.control
  }
}

export default connect(changeStateToProps)(App)